package top.hzy520.attend.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.hzy520.attend.dao.AttendItemMapper;
import top.hzy520.attend.dto.AttendDto;
import top.hzy520.attend.entity.AttendItem;

import java.util.List;

/**
 * @Author: HouZeYu
 * @Description:
 * @Date: Created in 15:37 2018/8/7
 */
@Service
public class AttendServiceImpl implements AttendService {
    @Autowired
    private AttendItemMapper attendItemMapper;

    @Override
    public int selectAttendAcount(Long userId) {
        return attendItemMapper.selectAttendAcount(userId);
    }

    @Override
    public List<AttendItem> selectAttendList(Long userId, int offset, int limit) {
        return attendItemMapper.selectAttendList(userId,offset,limit);
    }

    @Override
    public List<AttendItem> selectBySearch(AttendDto attendDto) {
        return attendItemMapper.selectBySearch(attendDto);
    }

    @Override
    public int selectAttendAcountBySearch(AttendDto attendDto) {
        return attendItemMapper.selectAttendAcountBySearch(attendDto);
    }
}
